<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>会员中心-我的订单</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/base.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/m_index.css" />
	<script type="text/javascript">
		var APP = '<?php echo "__APP__" ;?>';
	</script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/head.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/menu.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/order.js"></script>

	<!-- 为了保证IE载入以下文件 -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-sham.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/es5-shim.min.js"></script>
	<!-- 载入less.js -->
	<script type="text/javascript" src="__PUBLIC__/Css/es5-shim/less-1.5.0.min.js"></script>
	<script type="text/javascript">
		$(function(){
			// 点击评价，显示隐藏评价输入框
			$('.pingjia').click(function(){
				$('.comments').hide()
				$(this).parents('.order-list').find('.comments').show();
			})
			$('.quxiao').click(function(){
				$(this).parents('.order-list').find('.comments').hide();
			})
		})
	</script>
</head>
<body>
<load file="__PUBLIC__/head.html"/>

<!-- 主体部分 开始-->
<div id="main">
<load file="__CONTROL_TPL__/left.html"/>
	
	<div id="right">
		<div class="pos">我的订单
			<select name="state" id="">
				<option value="all" <if value="$_GET['state'] eq 'all'">selected="selected"</if>>全部</option>
				<option value="unpaid" <if value="$_GET['state'] eq 'unpaid'">selected="selected"</if>>待付款</option>
				<option value="paid"  <if value="$_GET['state'] eq 'paid'">selected="selected"</if>>已付款</option>
			</select>
		</div>
		<div class="choose-state">	
			<table border="0" cellspacing="0" width="100%" align="center">
				<tr align="center" height="30" bgcolor="#f8f8f8">
					<th width="340">团购信息</th>
					<th width="50">数量</th>
					<th width="80">总价</th>
					<th width="180">订单状态</th>
					<th>操作</td>
				</tr>
			</table>
		</div>
		<if value="$orderInfo">
		<foreach from="$orderInfo" value="$v">
		<div class="order-list">
				<div class="order-num">
					<span><a href="{|U:'Member/del_order',array('order_id'=>$v['order_id'])}">删除</a></span>订单编号：{$v.order_id}
				</div>
				<div class="order-info">
					<ul>
						<li class="t-info">
							<div class="tu"><a href="{|U:'Article/index',array('gid'=>$v['gid'])}" target="_blank"><img src="__ROOT__/{$v.pic}" alt="" width="80" height="50" /></a></div>
							<div class="name">
								<p class="p1"><a href="{|U:'Article/index',array('gid'=>$v['gid'])}" target="_blank">{$v.title}</a></p>
								<p class="p2">有效期至：{$v.close_date}</p>
	
							</div>
						</li>
						<li class="count">{$v.goods_num}</li>
						<li class="total">¥{$v.subtotal}</li>
						<li class="state">
							<if value="$v['state'] eq 0">待付款<else>已付款</if><br /><a href="{|U:'Article/index',array('gid'=>$v['gid'])}" target="_blank">订单详情</a>
						</li>
						
						<li class="active"><if value="$v['state'] eq 0"><a href="{|U:'Buy/buy2',array('order_id'=>$v['order_id'])}" class="topay" target="_blank">去付款</a></if> <if value="$v['is_comments'] eq 0"><span class="topay pingjia" style="margin-top:5px; cursor:pointer">评价</span></if></li>
						
					</ul>
				</div>
				<div class="comments" style="margin:10px 0 0 0; display:none">
					<form action="{|U:'Comments/add_data'}" method="post">
						<textarea name="content" cols="60" rows="3"></textarea>
						<br />
					<input type="submit" value="评价" style="margin-top:10px; width:60px; height:30px;" />
					<input type="button" class="quxiao" value="取消" style="margin:10px 0 0 10px; width:60px; height:30px;" />
					<input type="hidden" name="gid" value="{$v.gid}" />
					<input type="hidden" name="order_id" value="{$v.order_id}" />
					</form>
				</div>
		</div>
		</foreach>
		<else>
		您没有订单
		</if>
	</div>
</div>
<!-- 主体部分 结束 -->


<!-- 底部开始 -->
<load file="__PUBLIC__/footer.html"/>
<!-- 底部结束 -->
</body>
</html>